<?php
require("include/top.php");
	if(isset($_GET['id'])) {
	$commercant=new Vendor($_GET['id']);
	$commercant->load();
	$tpl->assign('commercant',$commercant);
	}

		$countries=Country::getAllCountry();
		$tpl->assign('countries',$countries);
		$vendors=Vendor::getVendors();
		$tpl->assign('vendors',$vendors);
		
		if (isset($_POST['save'])) {
			require(FORM_PATH."add_commercant.form.php");
		}
		$tpl->display("header.tpl");
		$tpl->display("menu.tpl");
		$tpl->display("add_commercant.tpl");
		
		$tpl->display("footer.tpl");
		
		
	
		
	

		
		
require("include/bottom.php");	
?>
